<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var name = "windowsName";

        var a = {
            name: "Cherry",

            func1: function () {
                console.log(this.name)
            },

            func2: function () {
                // this.func1(); // 最后调用 func1 的对象是 a
                setTimeout(function () {
                    this.func1();   // 最后调用 setTimeout 的对象是 window
                }, 100);
            }

        };

        a.func2() // this.func1 is not a function
        // https://juejin.im/post/59bfe84351882531b730bac2#heading-4
    </script>
</body>

</html>